Skip to content

Merge upstream openMapper 0.1.25 into integration - #24

Merged
yumin278 merged 6 commits into
integrationfrom
merge/upstream-0.1.25
Nov 16, 2026
Merged

yumin278 merged 6 commits into
integrationfrom
merge/upstream-0.1.25

Conversation

@yumin278

@yumin278 yumin278 commented Nov 15, 2026 •

Copy link
Copy Markdown
Owner

Summary

Merge upstream openOMSI-org/openMapper 0.1.25 (bd3416d) into the fork's integration branch while retaining the fork-only road maker, bus-bay and timetable features.

The merge commit has two parents: 809da62 (integration) and bd3416d (upstream 0.1.25). This PR is intentionally not self-merged.

Upstream changes brought in

  • Fix all open issues openOMSI-org/openMapper#124 / 0.1.25 fixes, including original OMSI 2 map compatibility
  • hand-picked timetable paths, All trips, and time profiles
  • doc/sync.rs, complete.rs, end_snap.rs, object_paths.rs
  • shared omsi_name::ascii_stem() naming for OMSI-readable generated files
  • upstream road-maker and bus-bay filename fixes

Conflict resolution

src/pocket.rs

Kept the fork's:

  • two-sided bays (both_sides, bay_sli(&[Side]))
  • readable bay naming
  • independent bay texture handling (bay_texture_name / write_bay_type)

Took upstream's:

  • crate::omsi_name::ascii_stem(...)
  • dot-free generated bay stems

Generated names keep the _bay_ marker, e.g. _bay_right_3_0m and _bay_both_3_250m. Existing old names containing dots are not renamed or migrated. Tests cover recognition of both legacy and new names.

src/timetable/mod.rs — 1 conflict

Kept both sides: the fork's timetable editing state and upstream's hand-picked-route state/methods. Hand-picked status is preserved through rename/duplicate/delete and set_automatic_route() clears it only after an automatic replacement is accepted.

src/ui_timetable.rs — 6 conflicts

  1. State fields: kept the fork's batch/station-edit state and upstream's way_edit, all_trips, trip_filter, and profile.
  2. Initialization/reset state: retained both sides' fields.
  3. Map-pick mode: combined stop editing with hand-path picking; Select mode is active for picking || way_edit || insert_before.
  4. Pick-mode lifecycle: switching modes clears the mutually exclusive path/stop-pick state.
  5. Trip/line UI: retained the fork's timetable controls and upstream's All trips / hand-path UI.
  6. Upstream trip panel/profile behavior was retained where it superseded the old conflicting block.

Additional integration fix: batch recalculation now asks whether existing hand-picked routes may be overwritten. The checkbox appears only when eligible hand-picked trips exist and defaults off. Preserve mode protects their shared station links; overwrite mode clears the hand-picked marker only for successfully recalculated trips. Failed/conflicting trips retain their original route and marker.

locales/*.tsv

Kept entries from both sides and removed duplicate keys. The upstream additions are present in all 26 languages. zh-tw.tsv keeps the repository's Hong Kong road terminology; the_hong_kong_table_uses_hong_kong_road_words is unchanged.

Road maker filename guards

Functions added/changed:

  • omsi_name::ascii_stem_with_replacements()
  • RoadSpec::maker_filename()
  • RoadSpec::maker_filename_warning()
  • RoadSpec::check_maker_target()
  • RoadSpec::write_in_maker()
  • MakerTarget ownership tracking
  • road maker UI now retains the original filename while editing an existing road

Behavior:

  • warns when normalization is empty or uses underscore replacement and shows the actual filename
  • refuses to overwrite an existing .sli owned by another .road.json
  • an existing road opened via “Change it in the road maker” keeps its original filename even if the new normalization would differ
  • logs original filename, normalized filename and actual saved filename
  • bay texture / _lines.bmp / reserved _bay_ checks use the normalized stem

Tests cover Chinese, Cyrillic and plain ASCII names, filename collisions, legacy filename retention, and bay naming.

Key before/after output

Before batch reroute, a hand-picked trip could be recalculated while still carrying the hand-picked marker.

After:

  • Preserve: original .ttr and hand-picked marker stay unchanged; shared links are protected.
  • Overwrite: a successful route becomes automatic and clears the marker.
  • Failure/conflict: original .ttr, shared links and marker are retained.

Before generated bay width names could contain extra dots such as ..._3.0m.sli.
After they are dot-free apart from the extension, e.g. ..._bay_right_3_0m.sli, while legacy names remain recognizable.

Test checklist

  • cargo test --release --locked — 706 passed, 0 failed, 7 ignored
  • road maker compat_tests.rs, layout_tests.rs, review_tests.rs unchanged and passing
  • python3 tools/i18n/check.py
  • no duplicate TSV keys
  • Windows x64 branch workflow — https://github.com/yumin278/openMapper/actions/runs/43773683101
  • tools/package-windows.ps1 -Target x86_64-pc-windows-msvc
  • Windows x64 artifact uploaded — openMapper-windows-x64-upstream-0.1.25 (artifact 14186151807)

CI results

turbo-devv and others added 6 commits November 15, 2026 14:34
* Keep the editor open when an upload goes into a texture the graphics memory had no room for (fixes openOMSI-org#62)

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* The installer says which package the computer needs in place of Windows' "This app can't run on your PC" (fixes openOMSI-org#102)

The ARM64 installer stops on an Intel or AMD processor and names the x64 one; the x64
installer stops on a 32-bit Windows.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* The invisible AI-path splines' strips are left out where openMapper draws the lanes as lines (fixes openOMSI-org#66)

Since 0.1.19 the Logic tool showed both the strips of invis_street.sli / invis_sidewalk.sli and
openMapper's own lane lines on top of each other; they now show only with the lanes off.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Road types and objects named in Cyrillic keep their textures (fixes openOMSI-org#104)

A road type made in the Road Constructor took its file names from its name as typed, so
"Дорога" with painted markings gave Дорога.sli naming Дорога_lines.bmp. OMSI's files are
written in Windows-1252, where Cyrillic letters come out as &#1044;…, so the painted texture
was never found and the road was white. File names made from what the user types (road
types, bus bays, new and merged objects) are now spelled in Latin letters: "Дорога 3+3"
becomes Doroga_3_3.sli and Doroga_3_3_lines.bmp. The road keeps its name in the maker.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* The camera no longer moves by itself after Alt + Tab (fixes openOMSI-org#115)

Keys and mouse buttons let go of in another window never reached openMapper, so after
Alt + Tab a flying key or the right button stayed held and the camera flew on. Whatever is
held is now let go of when the window loses or gets the focus, and the keys the system says
are down as the window gets it (Windows reports a key stuck down there, at every start) no
longer move the camera: only a key pressed in the window does. A camera kept in the
settings for a map that is broken (not a number, tilted past straight down) is not taken.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* The map view keeps its size when an openMapper object is picked (fixes openOMSI-org#51)

An object made or merged in openMapper shows its Mesh section in the properties panel, whose
rows (the name field, "Height above sea level" with "Solid", a texture's long name) were
wider than the panel, so the panel grew and the map view shrank and slid away under the
click. Those rows wrap now, a texture shows its file name (the whole path on hover), and
anything still too wide in the panel scrolls sideways instead of widening it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* AI paths of road objects follow the object's height field, and lanes link up to 3 m apart in height (fixes openOMSI-org#120)

A road object with a [crossing_heightdeformation] field has its plate draped onto that field,
down a hill or up from a placement under the road, but its [path]s were laid out flat at the
object's base height: in the Logic tool they hung metres over (or under) the road they belong
to, and the bus route builder could not join them to the roads before and after. The paths
are now draped by the same field before the object's placement turns and lifts them, exactly
as the mesh is, wherever they are used: the lanes drawn on the map, the path ends that are
snapped to, and the timetable's road network.

Lane ends that meet on the ground plane are also linked when their heights differ by up to
3 m, as openOMSI links them (it was 2 m for routes and 1.5 m for the dead-end marks).

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Roads tool: a kerb's, wall's or fence's end is caught where it is drawn, the middle of its profile, not only at its line (fixes openOMSI-org#55)

A spline without AI paths often lies beside its own line (a kerb laid along a road's middle).
Its free end is now marked and caught at the middle of what it draws. Another spline of the
same type goes on from the line's end and is linked, so the two run on as one; a spline of
another type is put with the middle of its own profile on that point, keeping the end's way.
Roads with AI paths are caught at their line as before.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Complete to (J): a new piece of spline between two free ends of the selected splines, the two left as they are (fixes openOMSI-org#113)

Select the two pieces (or a chain) and press J, or use Complete to in the right-click menu, the
selection's properties or the command search. A new piece of the first selected spline's type
is laid between their free ends: one arc, two arcs meeting tangentially, or arc, straight, arc,
cut at 50 m. It meets both ends exactly in place, direction, height and gradient, and is linked
to them; their shape is not changed. Pressed again with the same selection it joins the two
ends left, closing the ring, so a shape can be filled from it. One undo step.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* The open map follows changes made to it in OMSI 2's editor and other programs (fixes openOMSI-org#119)

A map of the OMSI 2 folder that openMapper saved is edited as its copy in the
content folder, and the map list opens that copy from then on, so what OMSI 2's
editor saved afterwards into its own folder never showed in openMapper. Now:

- Opening such a map (from the list, the recent maps or File > Open) opens the
  copy and, when the OMSI 2 folder's map was changed since the copy was saved,
  asks whether to bring those changes over (the files they replace go into a
  backup) or keep the copy as it is. The copy remembers how the OMSI 2 map
  looked when it last took it in, so the question is asked once per change.
- While a map is open its folder is looked at every two seconds: tiles, the
  global settings, the timetable, the traffic and the descriptions changed by
  another program are read in again by themselves. Where the map has changes
  here not saved yet, it asks: reload from disk or keep mine. openMapper's own
  saves are not taken for outside changes.
- File > Reload from disk reads the whole map again.
- Opening a map lists its folders afresh (openOMSI's cached folder listings
  could miss files added since).
- The question about an autosave left behind says when the map's files were
  changed after it, as restoring then puts older tiles over newer ones.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Name the files openMapper makes so original OMSI 2 can read them (fixes openOMSI-org#100)

Scaled objects were written as `name~s1.876_1.436_1.876.sco` (and their meshes
likewise), names with a tilde and several dots that OMSI 2 does not read, so those
objects were missing there. They are now `name_scaled_1876_1436_1876.sco`, and a map
that still names copies of the old kind gets copies of the new name when it is opened
(save it once to keep them). Every other file openMapper makes (new objects, road
types, bus bays, junction plates, lane-free roads, a new map's folder) is named in
ASCII letters, digits, `_` and `-` only: accented and Cyrillic letters are spelt in
Latin ones, and a bay's width no longer puts a dot in its name.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Keep objects hung on others and the editor camera where OMSI 2 finds them on save (fixes openOMSI-org#73, fixes openOMSI-org#63)

- An object hung on another one ([attachObj]) is written after the object it hangs on.
  Omsi.exe and openOMSI drop an [attachObj] that comes before its parent in the tile
  file, so a sign hung on something later in the tile's list showed in openMapper and
  was gone in the game.
- A row of objects on a spline the tile no longer has names no spline (-1, as the stock
  maps write such a row) instead of keeping an index that now points at another spline
  or past the end of the list.
- The editor camera ([mapcam]) is kept on a tile the map has: on a tile that was taken
  away OMSI 2's editor opens the map looking at nothing but the sky.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Trips: paths picked by hand, every trip in one list, time from stop to stop (fixes openOMSI-org#122, fixes openOMSI-org#71, fixes openOMSI-org#116)

The way found for a trip no longer jumps over a short piece between two paths
(a junction's connector) to the path after it: it drives the piece, so the
track and station links join all along and the game's bus keeps its way.

A trip's way can be picked by hand, path by path, as in OMSI 2's editor
(Lines and timetable > a trip > Pick the paths on the map): a path clicked
after the end or before the start is added with the paths to it, one beside
the way takes the place of the part it goes round (another branch at a
junction), a path of the way is taken out. The way may run on before the
first stop and after the last. The paths are listed, can be taken out or
cut before the first and after the last stop, and are kept when the stops
change (the .ttr says so in a line the game passes over); "Find the way
automatically" goes back. Where two paths of a way do not join, the trip
editor, the view (a red mark) and the map check say so.

All trips lists every trip of the map, whichever line shows it or tour
drives it, those no tour drives too, to edit, give to a tour or delete. A
trip's line number can be set; a tour's departure can run any trip of the
map, to any of its time profiles.

How a stop is served offers OMSI 2's five choices in its words: Always,
Wait for departure time, Not served (checkpoint), On demand, Always + wait
for departure time.

A trip has time profiles to add, name and delete; each lists the time from
the stop before at every stop, to set: the times after it move along and
the trip's time with them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* One spelling of ASCII file names for road types, bays and objects

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
@yumin278
yumin278 merged commit 309ad4d into integration Nov 16, 2026
5 checks passed
@yumin278
yumin278 deleted the merge/upstream-0.1.25 branch November 16, 2026 00:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants